package com.houxy.task;

import com.houxy.repository.mapper.RegisterTempMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class RegisterTempTask {

    @Autowired
    private RegisterTempMapper registerTempMapper;

    /**
     * 定时任务，每天0点执行
     */
    @Scheduled(cron = "0 0 0 * * ? ")
    public void deleteRegisterTask() {
        registerTempMapper.deleteAll();
    }
}
